package com.lei.Proxy.statics;

/**
 * @author: leiGer
 * @Date: 2021/01/14
 * @Time: 22:55
 */
//销售人员
public class Saler {
    //挑选手机
    public Phone chossePhone(String brand,String series,String color){
        return new DummyPhone(brand,series,color);
    }
    //购买真机
    public Phone buyPhone(String brand,String series,String color){
        Phone phone = Depot.getInstance().getPhone(brand,series,color);
        if(phone == null){
            System.out.println(color+"色"+brand+series+"手机无货");
            return null;
        }
        System.out.println("购买"+phone.getColor()+"色"+phone.getBrand()+phone.getSeries()+"一部");
        return phone;
    }
}
